#ifndef __TCP_SERVER_H__
#define __TCP_SERVER_H__

#include <arpa/inet.h>
#include <iostream>
#include <netinet/in.h>
#include <numeric>
#include <string>
#include <thread>
#include <vector>

using namespace std;

class TcpServer {
private:
    int _fd;
    // vector<int> _clientArray;

public:
    TcpServer();
    TcpServer(int fd);
    ~TcpServer();

    bool bind(const string& ip, uint16_t port);

    bool listen(int n);

    int accept();

    bool start(void);
};

#endif
